<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title><ui:insert name="title">Default Title</ui:insert></title>
        <ui:param name="cssRoot" value="#{request.requestURL.substring(0, request.requestURL.length() - request.requestURI.length())}#{request.contextPath}"/>
        <ui:param name="root" value="#{request.requestURL.substring(0, request.requestURL.length() - request.requestURI.length())}#{request.contextPath}"/>
        <link href="#{cssRoot}/resources/css/dropdown-menu.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="#{cssRoot}/resources/css/jsfcrud.css" media="screen" rel="stylesheet" type="text/css" />
    </h:head>

    <h:body>
        <ul id="navigation" class="nav-main">
            <li><a href="http://www.psdgraphics.com/">Home</a></li>
            <ui:repeat value="#{menuController.menuItems}"  var="item">
                <li class="list"><a href="#">#{item.title}</a>
                <ul class="nav-sub">
                    <ui:repeat value="#{item.subMenuItems}"  var="it" rendered="#{item.subMenuItems ne null and not emptyitem.subMenuItems}">
                        <li><a href="#{root}/#{it.link}">#{it.title}</a></li>
                    </ui:repeat>                     
                </ul>
            </li>
            </ui:repeat>
            <li class="list"><a href="#">Freebies</a>
                <ul class="nav-sub">
                    <li><a href="http://www.psdgraphics.com/category/backgrounds/">Backgrounds</a></li>
                    <li><a href="http://www.psdgraphics.com/category/buttons/">Buttons</a></li>
                    <li><a href="http://www.psdgraphics.com/category/graphics/">Graphics</a></li>
                    <li><a href="http://www.psdgraphics.com/category/html-css/">HTML &amp; CSS</a></li>
                    <li><a href="http://www.psdgraphics.com/category/icons/">Icons</a></li>
                    <li><a href="http://www.psdgraphics.com/category/psd/">PSD</a></li>
                    <li><a href="http://www.psdgraphics.com/category/templates/">Templates</a></li>
                    <li><a href="http://www.psdgraphics.com/category/tutorials/">Tutorials</a></li>    
                </ul>
            </li>

            <li class="list"><a href="#">About</a>
                <ul class="nav-sub">
                    <li><a href="http://www.psdgraphics.com/about/">About PSDGraphics</a></li>
                    <li><a href="http://www.psdgraphics.com/commercial-use/">Commercial Use</a></li>
                    <li><a href="http://www.psdgraphics.com/about/terms-of-use/">Terms Of Use</a></li>
                </ul>
            </li>

            <li><a href="http://www.psdgraphics.com/advertise/">Advertise</a></li>
            <li><a href="http://www.psdgraphics.com/contact/">Contact</a></li>
        </ul>

        <h1>
            <ui:insert name="title">Default Title</ui:insert>
        </h1>
        <p>
            <ui:insert name="body">Default Body</ui:insert>
        </p>
    </h:body>

</html>
